/******************************************************************************
Module:  Disposer.cs
Notices: Copyright (c) 2006-2007 by Jeffrey Richter and Wintellect
******************************************************************************/


using System;


///////////////////////////////////////////////////////////////////////////////


namespace Microsoft.OfficeCommunicationsServer.Applications.Threading {
   public sealed class Disposer : IDisposable {
      public delegate void DisposeMethod();
      private readonly DisposeMethod m_disposeMethod = null;

      public Disposer(DisposeMethod disposeMethod) {
         if (disposeMethod == null) throw new ArgumentNullException("disposeMethod");
         m_disposeMethod = disposeMethod;
      }
      public void Dispose() { m_disposeMethod(); }
   }
}


//////////////////////////////// End of File //////////////////////////////////
